﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DelonixRegiaHMSys.Core.Interfaces;
using DelonixRegiaHMSys.Core.Models;

namespace DelonixRegiaHMSys.Infrastructure.Data
{
    public class EfRoomGuestReportQuery : IRoomGuestReportQuery
    {
        public IEnumerable<RoomGuestReport> GetAllRoomGuestReport()
        {
            var context = new hmsDBEntities();
            return context.guestDetails.Select(rgr => new RoomGuestReport()
            {
                guestID = rgr.guestID,
                guestFirstName = rgr.guestFirstName,
                guestLastName = rgr.guestLastName,
                homeAddress = rgr.homeAddress,
                nationality = rgr.nationality,
                contactNum = rgr.contactNum,
                emailAddress = rgr.emailAddress,
                mailAddress = rgr.mailAddress,
            });
        }

        
    }
}
